const Service = require('egg').Service;

class UserService extends Service {
	async addUser(params){
		try{
			const result = await this.app.mysql.insert('user',params)
			return result
		}catch(err){
			console.log(err)
			return null
		}
		
		
	}
	async user(params){
		try{
			const result = await this.app.mysql.get('user',params);
			return result
		}catch(err){
			console.log(err)
			return null
		}
	}
	async fabu(params){
		try{
			const result = await this.app.mysql.insert('pinlun',params);
			return result
		}catch(err){
			console.log(err)
			return null
		}
	}
	async getpinglun(params){
		try{
			const result = await this.app.mysql.select('pinlun');
			return result
		}catch(err){
			console.log(err)
			return null
		}
	}
}

module.exports = UserService